#!/bin/bash
echo "init db"
docker run  -it  authzed/spicedb migrate head --datastore-engine mysql --datastore-conn-uri "root:123456@(192.168.0.105:3306)/spicedb?parseTime=True"


docker run  -d --name spicedb \
    -p 50051:50051 \
    authzed/spicedb serve \
    --datastore-engine=mysql \
    --datastore-conn-uri="root:123456@(192.168.0.105:3306)/spicedb?parseTime=True" \
    --grpc-preshared-key "mykkokk"

